using FluentNHibernate.Mapping;
using Wikey.Entity;

namespace Wikey.Domain.Mappings
{
    public class DocumentMap : ClassMap<Document> {
        public DocumentMap() {
            Id(x => x.Id);
            Map(x => x.Name);
            Map(x => x.Size);
            Map(x => x.Filename);
            Map(x => x.ContentType);
            References(x => x.Page).Column("PageId").Cascade.All();
            Not.LazyLoad();
        }
    }
}